Machine translation is going through a radical revolution, driven by theexplosive development of deep learning techniques using Convolutional NeuralNetwork (CNN) and Recurrent Neural Network (RNN). In this paper, we consider aspecial case in machine translation problems, targeting to translate naturallanguage into Structural Query Language (SQL) for data retrieval overrelational database. Although generic CNN and RNN learn the grammar structureof SQL when trained with sufficient samples, the accuracy and trainingefficiency of the model could be dramatically improved, when the translationmodel is deeply integrated with the grammar rules of SQL. We present a newencoder-decoder framework, with a suite of new approaches, including newsemantic features fed into the encoder as well as new grammar-aware statesinjected into the memory of decoder. These techniques help the neural networkfocus on understanding semantics of the operations in natural language and savethe efforts on SQL grammar learning. The empirical evaluation on real worlddatabase and queries show that our approach outperform state-of-the-artsolution by a significant margin.
展开▼